package com.ohos.connent.bizscenecloud.biz.modular.dp.service;


import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ohos.connent.bizscenecloud.biz.modular.dp.entity.BizDpProduct;
import com.ohos.connent.bizscenecloud.biz.modular.dp.param.*;
import com.ohos.connent.bizscenecloud.biz.modular.dp.result.BizProCategoryDetailResult;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface BizDpProductService extends IService<BizDpProduct> {

    /**
     * 获取品类树
     * @param bizProCategoryDictTreeParam 查询条件：关键字
     * @return
     */
    List<Tree<String>> tree(BizDpProductTreeParam bizProCategoryDictTreeParam);

    /**
     * 新增
     * @param bizDpProductAddParam 产品参数
     */
    void add(BizDpProductAddParam bizDpProductAddParam);

    void edit(BizDpProductEditParam bizDpProductEditParam);

    /**
     * 复制
     * @param bizDpProductIdParam 产品id
     */
    void copy(BizDpProductIdParam bizDpProductIdParam);

    /**
     * 删除
     * @param bizDpProductIdParam 产品id
     */
    void delete(BizDpProductIdParam bizDpProductIdParam);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    BizDpProduct queryEntity(String id);

    /**
     * 产品详情
     * @param bizDpProductIdParam 产品id
     * @return
     */
    BizDpProduct detail(BizDpProductIdParam bizDpProductIdParam);

    /**
     * 获取品类ICON文件id
     * @param file
     * @return
     */
     void geFileUploadIconId(MultipartFile file) throws IOException;
    /**
     * 获取产品分页
     *
     * @param bizDpProductPageParam 分页参数
     * @return 分页列表
     */
    Page<BizDpProduct> page(BizDpProductPageParam bizDpProductPageParam);

    void examine(BizDpProductExamineParam bizDpProductExamineParam);

    List<String> examineList(BizDpProductIdParam bizDpProductExamineParam);

    Map<String, Tree> getTreeList(BizDpProductTreeParam bizDpProductTreeParam);

    void submit(BizDpProductIdParam bizDpProductIdParam);

    void withdraw(BizDpProductIdParam bizDpProductIdParam);

    BizDpProduct getByProdId(BizDpProductProdIdParam bizDpProductProdIdParam);

    BizProCategoryDetailResult getCategoryDictDetail(String categoryDictId);

    Page<BizDpProduct> listByPage(BizDpProductPageParam bizDpProductPageParam);

    void profileDownload(BizDpProduct bizDpProduct, HttpServletResponse response);

}
